﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using LapvWebComponent;
using LapvBussiness;
using System.Text.RegularExpressions;
using System.Text;

namespace LapvWebM.Pages
{
    public partial class News : System.Web.UI.Page
    {
        public string domainStyle = ConfigLapv.Instance.DomainStyle;
        public string domain = ConfigLapv.Instance.DomainAdmin;
        protected void Page_Load(object sender, EventArgs e)
        {
            using (lapvwebEntities db = new lapvwebEntities())
            {
                List<news> lst = db.news.ToList();
                Rpt.DataSource = lst;
                Rpt.DataBind();
            }

        }

        public static string converToUnsign1(string s)
        {
            Regex regex = new Regex("\\p{IsCombiningDiacriticalMarks}+");
            string temp = s.Normalize(NormalizationForm.FormD);
            temp = regex.Replace(temp, String.Empty).Replace('\u0111', 'd').Replace('\u0110', 'D');
             return temp.Replace(" ", "-");      
            
        }
    }

}